<template>
	<view >
	   <My-login v-if="JSON.stringify(Info)=='{}'" ></My-login>
	    <My-register v-else></My-register>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value:""
			};
		},
		mounted(){
			
		},
		computed:{
			Info(){
				return uni.$Store.state.cartdata.userInfo
				}
		},
		methods:{
			getInfo(){
				// this.Info=e
				console.log(uni.$Store.state)
			},
		setBadge(){
			uni.setTabBarBadge({
				index:2,
			text:uni.$Store.getters.total>0?uni.$Store.getters.total+"":this.removeBadge()
			})
		},
		removeBadge(){
			uni.removeTabBarBadge({
				index:2
			})
			
		}
			
		},
		onShow(){
			this.setBadge()
		}
	}
</script>

<style lang="scss">
 
</style>
